package com.cq.hd.common.enums.biz;

import lombok.Getter;

/**
 * @description: 商户类型：商户/商家类型
 * @author: mYunYu
 * @date: 2021/8/23 14:28
 * @version: v1.0
 */
public enum MerchantTypeEnum {
    CY(1, "餐饮"),
    YPHB(2, "饮品/烘焙"),
    BLD(3, "便利店"),
    BHCS(4, "百货/超市"),
    SPSX(5, "食品生鲜"),
    FS(6, "服饰"),
    MZMY(7, "美妆美业"),
    MYQZ(8, "母婴亲子"),
    JJSH(9, "家居生活"),
    JKYS(10, "健康养生"),
    XPXB(11, "鞋品箱包"),
    SMDQDNBG(12, "数码电器/电脑办公"),
    QXQC(13, "器械器材"),
    XXYL(14, "休闲娱乐"),
    CWYP(15, "宠物/宠物用品"),
    HJZB(16, "黄金珠宝"),
    ZBYJ(17, "钟表眼镜"),
    YDHW(18, "运动户外"),
    TSYXWJYQ(19, "图书音像/文具乐器"),
    HQSY(20, "婚庆/摄影"),
    ZSSJ(21, "装饰/设计"),
    GGHZHDCH(22, "广告/会展/活动策划"),
    HJJY(23, "婚介/交友"),
    JTJY(24, "交通/加油"),
    JQJD(25, "景区/酒店"),
    LXS(26, "旅行社"),
    JZWX(27, "家政/维修"),
    QT(28, "其他"),
    ;

    @Getter
    private final Integer value;

    @Getter
    private final String name;

    MerchantTypeEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static MerchantTypeEnum typeOf(Integer value) {
        MerchantTypeEnum[] values = MerchantTypeEnum.values();
        for (MerchantTypeEnum v : values) {
            if (v.value.equals(value)) {
                return v;
            }
        }
        return null;
    }

    public static MerchantTypeEnum typeOf(String name) {
        MerchantTypeEnum[] values = MerchantTypeEnum.values();
        for (MerchantTypeEnum v : values) {
            if (v.name.equals(name)) {
                return v;
            }
        }
        return null;
    }

}
